package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.business.domain.Bid;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;
import cn.wolfcode.p2p.business.domain.PaymentScheduleDetail;

import java.util.List;

public interface IPaymentScheduleDetailService {
    /**
     * 生成收款计划
     * @param paymentSchedule 还款计划对象
     * @param bids 一个借款对象下的所有投标对象
     * @param bidRequest 借款对象
     */
    List<PaymentScheduleDetail> collectionPlan(PaymentSchedule paymentSchedule, List<Bid> bids, BidRequest bidRequest);

    /**
     * 查询逾期
     * @param paymentScheduleDetail
     */
    void upadtePayDate(PaymentScheduleDetail paymentScheduleDetail);

    /**
     * 设置逾期
     * @param bidId
     * @param userId
     * @param transferState
     */
    void updateTransferStateByBidIdAndUserId(Long bidId,Long userId,boolean transferState);

    /**
     * 更新收款人转让状态
     * @param bidId
     * @param transFromId
     * @param transToId
     * @param transferState
     */
    void updateTransferStateAndTranToByBidIdAndUserId(Long bidId, Long transFromId, Long transToId, boolean transferState);
}
